<template>
    <div id="cardarticle">
        <head-tip :title="$route.query.cname" :isback=true>
        </head-tip>
        <section class="content">
             <div  @click="tochildrencard(item.ichildtype,item.ichildid,item.ichilduid)" v-for="(item,key) in members" :key="key" class="staff-one">
                <img :src="baseUrl+item.cchildplogo"><span>{{item.cchildname}}</span>
            </div>
        </section>
        
    </div>
</template>

<script>
import {baseUrl} from '@/config/env.js'
import headTip from '@/components/common/head'

export default {
    data () {
      return {
        members:'',
        baseUrl:baseUrl
      };
    },
    methods:{
        
    },
    components:{
        headTip
    },
    mounted(){
        //获取名帖详情
        let self = this;
        this.$axios.get(this.httpurl('card/detailsCard'),{params:{id:this.$route.query.id,uid:this.$route.query.uid}}).then(response=>{
            var data=response.data
            if(data.result==1){
                self.members = data.data.childcards
            }else{

            }
        });
       
    },
    methods:{
        tochildrencard(type,id,uid){
           var tourl='/card/companyCard'
           if(type==1){
               tourl='/card/personCard'
           }
           this.$router.push({path: tourl,query: {id:id,uid:uid}});
        },
    }
}
</script>

<style scoped>
    .content{
        padding-top:3rem;
        box-sizing: border-box;
    }
    .staff-one {
        display: block;
        width: 25%;
        height: auto;
        float: left;
        text-align: center;
        margin-top: 1rem;
    }
    .staff-one img {
        display: block;
        width: 70%;
        margin: auto;
        height: auto;
        border-radius: 100px;
    }
    .staff-one span {
        display: block;
        height: 1rem;
        font-size: .8rem;
        padding-top: .3rem;
        overflow: hidden;
    }
</style>
